-- ----------------------------------------------------------
--
-- Author: czf
-- date: 2018-12-4
-- description: 抽象中介者
--
-- ----------------------------------------------------------

Mediator = Mediator or BaseClass(AbstractMediator)

function Mediator:__init(a, b)
	self.A = a
	self.B = b
end

function Mediator:__delete()
	-- body
end

function Mediator:AWin(money)
	self.A.money = self.A.money + money
	self.B.money = self.B.money - money
end

function Mediator:BWin(money)
	self.A.money = self.A.money - money
	self.B.money = self.B.money + money
end